var express = require('express')
var router = express.Router()
var bodyParser = require('body-parser')


var jsonParser = bodyParser.json({
	limit: '500mb'
})


try {
	
	
	router.get('/', function(req, res) {

		res.send({
			code: 200,
			msg: "test ok.. \r\n"
		})
	})
	

	let pub = require('./router/apublic.js');
	pub.api_router.map(r => {
		router.post(r.path, jsonParser, r.callback)
	})




} catch (e) {
	console.log(e)
}





module.exports = router